Skip to main content

SetCellWidth

Sets the cell width to the applied comb of characters.

Syntax

expression.SetCellWidth(nCellWidth);

expression - A variable that represents a ApiTextForm class.

Parameters

NameRequired/OptionalData typeDefaultDescription
nCellWidthOptionalmmfalseThe cell width measured in millimeters. If this parameter is not specified or equal to 0 or less, then the width will be set automatically. Must be >= 1 and <= 558.8.

Returns

boolean

Example

This example sets the cell width to the applied comb of characters.

let doc = Api.GetDocument();
let textForm = Api.CreateTextForm({"key": "Personal information", "tip": "Enter your first name", "required": true, "placeholder": "First name", "maxCharacters": 10, "multiLine": false, "autoFit": false});
let paragraph = doc.GetElement(0);
paragraph.AddElement(textForm);
textForm.SetComb(true);
textForm.SetCellWidth(7);